const express = require("express");
const router = express.Router();
const models = require("../models");
const Op = models.Sequelize.Op; // 模糊查询的时候需要用到

// 查询学院列表
router.get("/list", async function (req, res, next) {
  const result = await models.Grade.findAndCountAll();
  res.json({
    code: 200,
    msg: "操作成功",
    data: {
      total: result.count,
      data: result.rows,
    },
  });
});
module.exports = router;
